package com.financing.platform.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.financing.platform.dao.IProductVideoDao;
import com.financing.platform.dto.ProductVideo;
import com.financing.platform.util.SqlName;

@Repository("productVideoDao")
public class ProductVideoDaoImpl extends BaseDaoImpl implements IProductVideoDao {

	@Override
	public int deleteProductVideo(ProductVideo productVideo) throws Exception {
		return this.sqlMapClient.update(SqlName.deleteProductVideoByProduct, productVideo);
	}

	@Override
	public List<ProductVideo> queryProductVideo(ProductVideo productVideo) throws Exception {
		return (List<ProductVideo>)this.sqlMapClient.queryForList(SqlName.queryProductVideoByProduct, productVideo);
	}

	@Override
	public int insertProductVideo(ProductVideo productVideo) throws Exception {
		return (Integer) this.sqlMapClient.insert(SqlName.insertProductVideo, productVideo);
	}

	

}
